package ${package.Controller};

import org.springframework.web.bind.annotation.RequestMapping;
<#if restControllerStyle>
    import org.springframework.web.bind.annotation.RestController;
<#else>
    import org.springframework.stereotype.Controller;
</#if>
<#if superControllerClassPackage??>
    import ${superControllerClassPackage};
</#if>
import ${package.Service}.${table.serviceName};
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
* <p>
    * ${table.comment!}前端控制器
    * </p>
*
* @author ${author}
*/
@Slf4j
<#if restControllerStyle>
    @RestController
<#else>
    @Controller
</#if>
<#if kotlin>
    class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}()</#if>
<#else>
    <#if superControllerClass??>
        public class ${table.controllerName} extends ${superControllerClass} {
    <#else>
        @RequestMapping("/${entity?uncap_first}")
        public class ${table.controllerName} {
    </#if>

    @Autowired
    private ${table.serviceName}  ${table.serviceName?uncap_first};
    }
</#if>
